const fs = require("fs")
reName();
async function reName (){
    console.log(11111111);
    await fs.rename('as.txt', 'world.txt', (err) => {
        if (err) throw err;
        console.log('重命名完成');
        fs.rename('world.txt', 'as.txt', (err) => {
            if (err) throw err;
            console.log('重命名完成');
        });
    });
    // await start();
}

async function start(){
    fs.stat('world.txt', (err, stats) => {
        if (err) throw err;
        console.log(`文件属性: ${JSON.stringify(stats)}`);
    });
}
/**
 * 以下为特性示例代码
 * 
 */
getStockPriceByName('goog').then(function (result){
    console.log(result);
});
async function getStockPriceByName(name) {
    var symbol = await getStockSymbol(name);
    var stockPrice = await getStockPrice(symbol);
    return stockPrice;
  }
  

